
// 聊天接口
export const chat = async (data) => {
    const url = "";
    const options = {method:"POST",body:JSON.stringify(data)}
    fetch(url,options).then(async response => {
        const reader = response.body.getReader();

        // 读取数据
        // const { done, value } = await reader.read();
        // if (done) {
        //     console.log('Stream finished');
        //     return;
        // }
        let done;
        do{
            const t = await reader.read();
            done = t.done;
            console.log(t.value)

        }
        while(!done)
    })
}

// 获取推荐列表
export const getTuijian = async () => {}

// 登录接口
export const login = () => {}

// 获取会话 title 的接口
export const getGroupTitle = () => {}

// 保存用户数据
export const saveUserMessage = () => {}

// 获取用户数据
export const getUserGroups = () => {}

// 获取用户分组对话信息
export const getUserGroupMessage = () => {}